package com.jiedeng.dao;

import com.jiedeng.model.Corp;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author 覃远龙
 * @ClassName: ICorpRepository
 * @Description:
 * @date 2017/5/31 9:44
 */
public interface ICorpRepository extends JpaRepository<Corp, Long> {

    List<Corp> findByCaptionContaining(String caption);

    List<Corp> findByObsId(long obsId);

    //@Query("select t from Corp t where t.id = ?1")
    //@Query("select * from t_Corp t where t.Corp_ID = :id", nativeQuery=true)
    //@Query("select t from Corp t where t.id = :id")
    Corp findAllById(long id);
    List<Corp> findAllByRelationShip(long relationShip);
    List<Corp> findByCorpPropId(long corpPropId);
}
